import { Controller, Post, Body } from '@nestjs/common';
import { AuthService } from './auth.service';
import { CreateAuthDto } from './dto/create-auth.dto';
import { JwtNoVerify } from '../../decorators/index';

@Controller('auth')
export class AuthController {
  constructor(private readonly authService: AuthService) {}
  @JwtNoVerify()
  @Post('login')
  login(@Body() body: CreateAuthDto) {
    return this.authService.signIn(body.username, body.password);
  }
}
